
* =================================
* Paper title: It's All About Political Incentives: Democracy and the Renewable Feed-In Tariff
* Authors: Patrick Bayer (Glasgow) and Johannes Urpelainen (Columbia) 
* Journal of Politics

* Last modified: November 7, 2015

* Data files used: 
* System: Stata 13.1 on WIN 10

* Purpose: This do file replicates Figure 1 from the main text (world map)
* =================================

clear all

* Write Stata files from GIS data
* NB: The following code needs to be run only once to create '*_db' and '*_coord' files
shp2dta using ".\world.shp", database(world_db) coordinates(world_coord) genid(id)

* Load shapefile database
use "./world_db.dta"
rename ISO3 iso3

* Merge FIT data into shapefile database
merge 1:1 iso3 using "./FIT_map.dta"

* Plot map
spmap FIT using ".\world_coord.dta" if _merge==3 & FIT!=., id(id) ///
title("Adoption of FIT across the World") fcolor(Blues2) ///
legenda(on) ndfcolor(red) ndo(black) ///
legend(label(1 "No data") label(2 "No FIT adopted") label(3 "FIT adopted")) legend(position(8))

* Export graph
graph export "FIT_map.pdf", replace


